package org.elephantt.webby;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class EmptyOkResponder implements Responder {
  private static final EmptyOkResponder instance = new EmptyOkResponder();

  public static EmptyOkResponder getInstance() {
    return instance;
  }

  public void respond(HttpServletRequest request, HttpServletResponse response, Object controllerReturnValue) throws IOException {
    response.setContentLength(0);
    response.setStatus(HttpServletResponse.SC_OK);
  }
}
